package com.tarry.decorate.normal;

/**
 * 未使用装饰者模式时，对应需求扩展，增加定制编码
 */
public class BatterCakeClient {
    public static void main(String[] args) {
        // 普通煎饼
        BatterCake batterCake = new BatterCake();
        System.out.printf("%s,总价为：%d。\n",batterCake.getMsg(),batterCake.getPrice());
        // 煎饼加鸡蛋
        BatterCakeWithEgg batterCakeWithEgg = new BatterCakeWithEgg();
        System.out.printf("%s,总价为：%d。\n",batterCakeWithEgg.getMsg(),batterCakeWithEgg.getPrice());
        // 煎饼加鸡蛋和香肠
        BatterCakeWithEggAndSausage batterCakeWithEggAndSausage = new BatterCakeWithEggAndSausage();
        System.out.printf("%s,总价为：%d。\n",batterCakeWithEggAndSausage.getMsg(),batterCakeWithEggAndSausage.getPrice());
    }
}
